package com.ruoyi.recipes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.recipes.mapper.CookTimeOptionsMapper;
import com.ruoyi.recipes.domain.CookTimeOptions;
import com.ruoyi.recipes.service.ICookTimeOptionsService;

import javax.annotation.Resource;

/**
 * 烹饪时间选项Service业务层处理
 * 
 * @author syy
 * @date 2025-08-12
 */
@Service
public class CookTimeOptionsServiceImpl implements ICookTimeOptionsService 
{
    @Resource
    private CookTimeOptionsMapper cookTimeOptionsMapper;

    /**
     * 查询烹饪时间选项
     * 
     * @param id 烹饪时间选项主键
     * @return 烹饪时间选项
     */
    @Override
    public CookTimeOptions selectCookTimeOptionsById(Long id)
    {
        return cookTimeOptionsMapper.selectCookTimeOptionsById(id);
    }

    /**
     * 查询烹饪时间选项列表
     * 
     * @param cookTimeOptions 烹饪时间选项
     * @return 烹饪时间选项
     */
    @Override
    public List<CookTimeOptions> selectCookTimeOptionsList(CookTimeOptions cookTimeOptions)
    {
        return cookTimeOptionsMapper.selectCookTimeOptionsList(cookTimeOptions);
    }

    /**
     * 新增烹饪时间选项
     * 
     * @param cookTimeOptions 烹饪时间选项
     * @return 结果
     */
    @Override
    public int insertCookTimeOptions(CookTimeOptions cookTimeOptions)
    {
        return cookTimeOptionsMapper.insertCookTimeOptions(cookTimeOptions);
    }

    /**
     * 修改烹饪时间选项
     * 
     * @param cookTimeOptions 烹饪时间选项
     * @return 结果
     */
    @Override
    public int updateCookTimeOptions(CookTimeOptions cookTimeOptions)
    {
        return cookTimeOptionsMapper.updateCookTimeOptions(cookTimeOptions);
    }

    /**
     * 批量删除烹饪时间选项
     * 
     * @param ids 需要删除的烹饪时间选项主键
     * @return 结果
     */
    @Override
    public int deleteCookTimeOptionsByIds(Long[] ids)
    {
        return cookTimeOptionsMapper.deleteCookTimeOptionsByIds(ids);
    }

    /**
     * 删除烹饪时间选项信息
     * 
     * @param id 烹饪时间选项主键
     * @return 结果
     */
    @Override
    public int deleteCookTimeOptionsById(Long id)
    {
        return cookTimeOptionsMapper.deleteCookTimeOptionsById(id);
    }
}
